package com.qf.api;


import com.qf.po.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient("userinfo-service")
public interface UserInfoApi {
    @RequestMapping(value = "/userinfos",method = RequestMethod.GET)
    public List<UserInfo> userInfos();
    @RequestMapping(value = "/userinfo/{id}",method = RequestMethod.GET)
    public UserInfo userInfo(@PathVariable("id") Integer id);
    @RequestMapping(value = "/add",method = RequestMethod.POST)
    public UserInfo useradd(@RequestBody UserInfo userInfo);
    @RequestMapping(value = "/upd",method = RequestMethod.PUT)
    public UserInfo update(@RequestBody UserInfo userInfo);
    @RequestMapping(value = "/del/{id}",method = RequestMethod.DELETE)
    public boolean delete(@PathVariable("id") Integer id);
}
